package org.liquidByte.simpleChat.dto;

import java.io.Serializable;

public class User implements Serializable {
	private static final long serialVersionUID = 1406910742489290399L;
	private UserIdentification userIdent;
	private String name;
	private String status;
	private String statusMessage;
	
	public User(String name, String status, String statusMessage) {
		this.name = name;
		this.status = status;
		this.statusMessage = statusMessage;		
	}
	public User(UserIdentification userIdent, String name, String status, String statusMessage) {
		this(name, status, statusMessage);
		this.userIdent = userIdent;
	}
	
	public UserIdentification getUserIdent() {
		return userIdent;
	}
		public void setUserIdent(UserIdentification userIdent) {
		this.userIdent = userIdent;
	}

	public String getName() {
		return name;
	}
	public String getStatus() {
		return status;
	}
	public String getStatusMessage() {
		return statusMessage;
	}
	public void setName(String name) {
		this.name = name;
	}
	public void setStatus(String status) {
		this.status = status;
	}
	public void setStatusMessage(String statusMessage) {
		this.statusMessage = statusMessage;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result
				+ ((userIdent == null) ? 0 : userIdent.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		User other = (User) obj;
		if (userIdent == null) {
			if (other.userIdent != null)
				return false;
		} else if (!userIdent.equals(other.userIdent))
			return false;
		return true;
	}
	
}
